//package com.hmdp.rabbitMq;
//
//import com.hmdp.constants.RabbitMqConstants;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.amqp.rabbit.core.RabbitTemplate;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//@Service
//@Slf4j
//public class MqPublisher {
//    /**
//     * 消息发送者
//     */
//        @Autowired
//        private RabbitTemplate rabbitTemplate;
//        private static final String ROUTINGKEY = RabbitMqConstants.RABBITMQ_ROUTINGKEY;
//        /**
//         * 发送秒杀信息
//         * @param msg
//         */
//        public void sendSeckillMessage(String msg){
//            log.info("发送消息"+msg);
//            rabbitTemplate.convertAndSend(RabbitMqConstants.RABBITMQ_EXCHANGE,ROUTINGKEY,msg);
//    }
//
//}
